<extend name="Base/manage_common"/>
<block name="body">
    <div class="row container">
        <table class="table table-bordered table-hover">
            <tr style="background-color: #F2F3F7;">
                <th>序号</th>
                <th>场次</th>
                <th>组别</th>
                <th>参赛年龄要求</th>
                <th>参数队伍要求</th>
                <th>比赛项目</th>
                <th>参赛人数</th>
                <th>参赛</th>
            </tr>
            <volist name="_games" id="vo">
                <tr class="success">
                    <td>{$vo.g_id}</td>
                    <td>{$vo.g_name}</td>
                    <td>{$vo.g_type}</td>
                    <td>
                       <span style="color: #e9322d">{$vo.min_age}</span>岁以上，
                        <span style="color: #e9322d">{$vo.max_age}</span>岁以下</td>
                    <td>
                        至少<span style="color: #e9322d">{$vo.auth_min_count}</span>人，
                        至多<span style="color: #e9322d">{$vo.auth_max_count}</span>人
                    </td>
                    <td>{$vo.g_short}</td>
                    <td>{$vo.current_count}/{$vo.g_maxperson}</td>
                    <td>
                        <php>
                            //TODO 是否已经报名，是否结束，是否开始
                            $startTime=strtotime($_allGame['all_b_time']);
                            $endTime=strtotime($_allGame['all_e_time']);
                            $timeNow=time();
                            $canBaoStatus=0;
                            if($startTime<$timeNow&&$endTime>$timeNow){
                               $canBaoStatus=1;
                            }
                        </php>
                        <eq name="canBaoStatus" value="1">
                            <a href="{:U('Project/apply',array('id'=>$vo['g_id']))}">报名</a>
                            <else/>
                            不可报名
                        </eq>
                    </td>
                </tr>
            </volist>
        </table>
    </div>
</block>
